/ Assembly List / LJCNetCommon / NetCommon / TextBytesToBase64Bytes

Namespace - LJCNetCommon


Parameters
bytes - The byte array.

Returns

The Base64 byte array.

Syntax

C#
public static Byte[] TextBytesToBase64Bytes(Byte[] bytes)

Encodes a byte array to a Base64 byte array. (E)

Example

C#
using LJCNetCommon;
        
// Encodes a Text byte array to a Base64 byte array.
private static void TextBytesToBase64Bytes()
{
  // Setup
  byte[] textBytes = NetCommon.TextToBytes("Text");

  // Encodes a byte array to a Base64 byte array.
  byte[] base64Bytes = NetCommon.TextBytesToBase64Bytes(textBytes);

  // Check the text.
  string text = NetCommon.Base64BytesToText(base64Bytes);
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.